package com.school.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.school.mapper.TposMapper;
import com.school.pojo.Tpos;
import com.school.service.TposService;

@Service
@Transactional
public class TposServiceImpl implements TposService{
	
	@Autowired
	private TposMapper tposMapper;
	
	@Override
	public List<Tpos> findAll(Tpos t, int page, int pageSize) {
		PageHelper.startPage(page,pageSize);
		return tposMapper.findAll(t);
	}

	@Override
	public int add(Tpos t) {
		
		return tposMapper.add(t);
	}

	@Override
	public Tpos findbyId(int tpos_id) {
		
		return tposMapper.findbyId(tpos_id);
	}

	@Override
	public int edit(Tpos t) {
		
		return tposMapper.edit(t);
	}

	@Override
	public int delbatch(int[] id) {
		
		return tposMapper.delbatch(id);
	}
	
}
